package com.xx;

import com.xx.config.SpringConfig;
import com.xx.dao.BaseDao;
import com.xx.dao.StudentDao;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import javax.sql.DataSource;

/**
 * Hello world!
 *
 */
public class App 
{
    public static void main( String[] args )
    {
        //创建spring容器
        ApplicationContext context = new AnnotationConfigApplicationContext(SpringConfig.class) ;


        BaseDao baseDao = context.getBean(BaseDao.class);
        baseDao.showDataBase();

//        StudentDao studentDao = context.getBean(StudentDao.class);
//        studentDao.StudentMg();
//
//        DataSource dataSource = context.getBean(DataSource.class);
//        System.out.println(dataSource);


    }
}
